# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=postgresql-tsearch-czech
_projname=ispell_czech
pkgver=0_git20120119
_gitrev=0d7722677b1a5e485eb0813c96c4ab13ac5ec7b0
pkgrel=8
pkgdesc="Czech ispell dictionary (UTF-8) for fulltext search in PostgreSQL"
url="https://github.com/tvondra/ispell_czech"
arch="noarch"
license="GPL-3.0"
makedepends="perl postgresql-dev"
install="$pkgname.post-install"
source="https://github.com/tvondra/ispell_czech/archive/$_gitrev/$pkgname-$_gitrev.tar.gz
	tsearch_czech_create.sql
	"
builddir="$srcdir/$_projname-$_gitrev"
options="!check"  # N/A

build() {
	make czech.dict
}

package() {
	depends="postgresql$(pg_config --major-version)"

	local pgshare="$pkgdir$(pg_config --sharedir)"

	install -d "$pgshare"/tsearch_data
	install -m 644 -t "$pgshare"/tsearch_data/ czech.dict czech.affix
	install -m 644 -t "$pgshare"/ "$srcdir"/tsearch_czech_create.sql
}

sha512sums="
1adaad501b36408b8b05ad96a5c8c9e8e5cf1c6524a9ffb6c1fe0405c5d1dcce9ee3f332e83ea11e3a88e55d6978338400797f053cd8318702b3d0e46de02552  postgresql-tsearch-czech-0d7722677b1a5e485eb0813c96c4ab13ac5ec7b0.tar.gz
ec5b715c8aa455b458bea1ac681d691fd8906f4f83c42b6d008ff53f770df35c18968171c818ba2a9aecd6c4113d605890e1a9ed83e7afe284e220c74efe2a68  tsearch_czech_create.sql
"
